home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / os2 / nortutil.zip / src / Ken / ken.l next >
Text File  |  1996-08-28  |  7KB  |  271 lines

  1. %e 3000
  2. %p 6000
  3. %n 1000
  4. %k 500
  5. %a 4000
  6. %o 2000
  7. BW [     ]
  8. EW [     .,;!?]
  9. %{
  10.     char buf[128];
  11. %}
  12.  
  13. %%
  14.  
  15. stairs        printf("apples and pears");
  16. Downstairs    printf("Down the apples and pears");
  17. downstairs    printf("down the apples and pears");
  18. Upstairs    printf("Up the apples and pears");
  19. upstairs    printf("up the apples and pears");
  20. [Mm]outh    printf("North and South");
  21. [Ff]ace        printf("Boat Race");
  22. [Tt]rouble    printf("Barney Rubble");
  23. wife        {    switch(rand()%2)
  24.             {
  25.             case 0: printf("trouble and strife"); break;
  26.             case 1: printf("ole lady"); break;
  27.             }
  28.         }
  29. Road        printf("Frog and Toad");
  30. " road"        printf(" frog and toad");
  31. "pub "        printf("rub-a-dub ");
  32. " bar "        printf(" boozer ");
  33. " husband"    printf(" ole man");
  34. Party        printf("Knees-up");
  35. party        printf("knees-up");
  36. Parties        printf("Knees-ups");
  37. parties        printf("knees-ups");
  38. My        printf("Me");
  39. " my"        printf(" me");
  40. Your        printf("Yer");
  41. your        printf("yer");
  42. "You are "      printf("Yer ");
  43. "you are "      printf("yer ");
  44. You        printf("Yer");
  45. you        printf("yer");
  46. Those        printf("Them");
  47. those        printf("them");
  48. " those"    printf(" them");
  49. "(those"    printf("(them");
  50. "The "        {   switch(rand()%5)
  51.             {
  52.             case 0: printf("The bleedin' "); break;
  53.             default: ECHO; break;
  54.             }
  55.         }
  56. "The"        ECHO;
  57. " the "        {   switch(rand()%5)
  58.             {
  59.             case 0: printf(" the bleedin' "); break;
  60.             default: ECHO; break;
  61.             }
  62.         }
  63. [" "(]the    ECHO;
  64. "the "        {   switch(rand()%5)
  65.             {
  66.             case 0: printf(" the bleedin' "); break;
  67.             default: ECHO; break;
  68.             }
  69.         }
  70. [Tt]his        ECHO;
  71. [" "(]this    ECHO;
  72. [Tt]hat        ECHO;
  73. [" "(]that    ECHO;
  74. Thus        printf("So");
  75. " thus"        printf(" so");
  76. "(thus"        printf("(so");
  77. "thus"        printf("so");
  78. [Tt]han        ECHO;
  79. [" "(]than    ECHO;
  80. Who        ECHO;
  81. who        ECHO;
  82. " old "        printf(" ole ");
  83. " to "        printf(" ter ");
  84. "Aren't you "   printf("Aintcha ");
  85. "aren't you "   printf("aintcha ");
  86. "Aren't"    printf("Ain't");
  87. "aren't"    printf("ain't");
  88. "Isn't"        printf("Ain't");
  89. "isn't"        printf("ain't");
  90. "Are not "    printf("Ain't");
  91. "are not "    printf("ain't ");
  92. "Is not "    printf("Ain't ");
  93. " is not "    printf(" ain't ");
  94. "What is th"    printf("Woss");
  95. "what is th"    printf("woss");
  96. "What are you "    printf("Wotcher ");
  97. "what are you "    printf("wotcher ");
  98. "What you are"    printf("Wotcher");
  99. "what you are"    printf("wotcher");
  100. "What you're"    printf("Wotcher");
  101. "what you're"    printf("wotcher");
  102. "What are your"    printf("Wotcher");
  103. "what are your"    printf("wotcher");
  104. "What do you "  printf("Wotcher ");
  105. "what do you "    printf("wotcher ");
  106. "What do your"  printf("Wotcher");
  107. "what do your"    printf("wotcher");
  108. " "H[aeu]llo    printf(" Wotcher");
  109. " "h[aeu]llo    printf(" wotcher");
  110. What        printf("Wot");
  111. what        printf("wot");
  112. Were        printf("Was");
  113. were         printf("was");
  114. Bother        printf("Ars");
  115. bother        printf("ars");
  116. Mother        printf("Muvver");
  117. Other        printf("Uvver");
  118. other        printf("uvver");
  119. Father        printf("Favver");
  120. father        printf("favver");
  121. Rather        printf("Ravver");
  122. rather        printf("ravver");
  123. Weather        printf("Wevver");
  124. weather        printf("wevver");
  125. Leather        printf("Levver");
  126. leather        printf("levver");
  127. Wither        printf("Wivver");
  128. wither        printf("wivver");
  129. Either        printf("Eever");
  130. either        printf("eever");
  131. With        printf("Wiv");
  132. with        printf("wiv");
  133. Anything    printf("Anyfink");
  134. anything    printf("anyfink");
  135. Something    printf("Sumfink");
  136. something    printf("sumfink");
  137. Nothing        printf("Nuffink");
  138. nothing        printf("nuffink");
  139. guitars        printf("spoons");
  140. guitar        printf("spoons");
  141. drums        printf("spoons");
  142. drum        printf("spoons");
  143. trumpets    printf("spoons");
  144. trumpet        printf("spoons");
  145. violins        printf("spoons");
  146. violin        printf("spoons");
  147. clarinets    printf("spoons");
  148. clarinet    printf("spoons");
  149. trombones    printf("spoons");
  150. trombone    printf("spoons");
  151. oboes        printf("spoons");
  152. oboe        printf("spoons");
  153. flutes        printf("spoons");
  154. flute        printf("spoons");
  155. tubas        printf("spoons");
  156. tuba        printf("spoons");
  157. Data        printf("Info");
  158. data        printf("info");
  159. Directory    printf("Lockup");
  160. directory    printf("lockup");
  161. Directories    printf("Lockups");
  162. directories    printf("lockups");
  163. [Pp]rocess    {   switch(rand()%2)
  164.             {
  165.             case 0: printf("Queen Bess"); break;
  166.             case 1: printf("Rudolf 'Ess"); break;
  167.             }
  168.         }
  169. [Cc]omputer    printf("French Tutor");
  170. [Bb]yte        printf("Jimmy White");
  171. [Ff]iles    printf("Nobby Stiles");
  172. [Ff]ile        printf("Royal Mile");
  173. [Ll]anguage    printf("'Am Sandwich");
  174. [Zz]ero        printf("Emperor Nero");
  175. [Jj]ob        printf("Uncle Bob");
  176. [Ss]hell    printf("Bow Bell");
  177. [Ss]ave        printf("Chas'n'Dave");
  178. [Ll]oad        printf("Old Kent Road");
  179. [Mm]ouse    printf("Doll's 'Ouse");
  180. [Bb]uffer    printf("Sausage Stuffer");
  181. [Kk]eyboard    printf("Henry Ford");
  182. [Mm]anual    printf("Cocker Spaniel");
  183. [Ss]creen    printf("James Dean");
  184. [Pp]rinter    printf("'Arold Pinter");
  185. [Pp]lotter    printf("Pansy Potter");
  186. [Cc]ompiler    printf("Martin Tyler");
  187. [Ss]tring    printf("Emperor Ming");
  188. [Bb]rain    printf("Michael Caine");
  189. [Pp][Aa][Ss][Cc][Aa][Ll]    {   switch(rand()%2)
  190.                     {
  191.                     case 0: printf("Pall Mall"); break;
  192.                     case 1: printf("Roald Dahl"); break;
  193.                     }
  194.                 }
  195. [Aa][Ll][Gg][Oo][Ll]    printf("Johnny Ball");
  196. [Ff][Oo][Rr][Tt][Rr][Aa][Nn]    printf("Manfred Mann");
  197. [Cc][Oo][Bb][Oo][Ll]    printf("Albert Hall");
  198. Stopped        printf("'Ad the mockers put on");
  199. stopped        printf("'ad the mockers put on");
  200. Stopping    printf("Putting the mockers on");
  201. stopping    printf("putting the mockers on");
  202. stops        printf("puts the mockers on");
  203. stop        printf("put the mockers on");
  204. STOP        printf("Put The Mockers On");
  205. [Ll]ondoner    printf("Cockney");
  206. friend        {   switch(rand()%3)
  207.             {
  208.             case 0: printf("mucker"); break;
  209.             case 1: printf("mate"); break;
  210.             case 2: printf("china"); break;
  211.             }
  212.         }
  213. "a h"        printf("an '");
  214. "A h"        printf("An '");
  215. " h"        printf(" '");
  216. " H"        printf(" '");
  217. " C-"        printf(" Bruce Lee-");
  218. " C "        {        switch(rand()%4)
  219.              {
  220.              case 0: printf(" Bruce Lee "); break;
  221.              case 1: printf(" Circus Flea "); break;
  222.              case 2: printf(" Bumble Bee "); break;
  223.              case 3: printf(" Door Key "); break;
  224.              }
  225.         }
  226. " C."        printf(" Circus Flea.");
  227. Th        printf("F");
  228. Wh        printf("W");
  229. wh        printf("w");
  230. aw        printf("or");
  231. " sing"        ECHO;
  232. " ring"        ECHO;
  233. "ing "        printf("in' ");
  234. " th"        printf(" f");
  235. "th"        printf("ff");
  236. ". "        {   switch(rand()%32)
  237.             {
  238.             case 0: printf(". I'll get out me spoons. "); break;
  239.             case 1: printf(". Yer can't 'ave a knees-up wivout a joanna. "); break;
  240.             case 2: printf(". Cor blimey guv, would I lie to you. "); break;
  241.             case 3: printf(". I'll make us all a nice cup of tea. "); break;
  242.             default: ECHO; break;
  243.             }
  244.         }
  245. "? "        {   switch(rand()%3)
  246.             {
  247.             case 0: printf(", mate? "); break;
  248.             case 1: printf(", guv? "); break;
  249.             case 2: printf(", squire? "); break;
  250.             }
  251.         }
  252. "! "        {   switch(rand()%6)
  253.             {
  254.             case 0: printf(", cor blimey! "); break;
  255.             case 1: printf("! Struth! "); break;
  256.             case 2: printf(", guv! "); break;
  257.             case 3: printf("! Honest guv! "); break;
  258.             case 4: printf(", mate! "); break;
  259.             case 5: ECHO; break;
  260.             }
  261.         }
  262. .        printf(yytext);
  263. \n        printf("\n");
  264. %%
  265.  
  266. main()
  267. {
  268.     srand(getpid());
  269.     yylex();
  270. }
  271.